﻿using Excel = Microsoft.Office.Interop.Excel;

namespace lp1415_11951_TP2.model
{
    class LerFicheiroExcel
    {
        private Excel.Application xlApp;
        private Excel.Workbook xlWorkBook;
        private Excel.Worksheet xlWorkSheet;
        private Excel.Range range;
        private string str;

        private int rCnt = 0;
        private int cCnt = 0;

        public Excel.Range Range
        {
            get { return range; }
        }


        public Excel.Worksheet lerFicheiro(string path)
        {
            xlApp = new Excel.Application();
            xlWorkBook = xlApp.Workbooks.Open(path);
            return xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);
        }
    }
}
